package com.hhj.king.first.ribbon.server;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;

import java.util.Scanner;

/**
 * @author KING
 * @date 2018/10/10 20:25
 */
@SpringBootApplication
public class FirstRibbonServerApp {
    public static void main(String[] args) {
        // 读取控制台输入作为端口参数
        Scanner scan = new Scanner(System.in);
        String port = scan.nextLine();
        // 设置启动的服务器端口
        new SpringApplicationBuilder(FirstRibbonServerApp.class)
                .properties("server.port=" + port).run(args);
    }

}
